using System.Collections;

namespace ntools.NetduinoGo.PlusModule.NetduinoGo.Framework
{
    public class FileEnumerable : IEnumerable
    {
        private string path;

        public FileEnumerable(string path)
        {
            this.path = path;
        }

        public IEnumerator GetEnumerator()
        {
            return new FileEnumerator(Plus.Link.Call(Link.INSTANCE_DIRECTORY, Link.COMMAND_DIRECTORY_GETENUMERATOR, System.Text.Encoding.UTF8.GetBytes(path))[0]);
        }
    }
}
